<div class="login-warp">
    <div class="login-inner">
        <div class="login-logo">
            <img src="/Extend/images/logo/login-logo.svg"/>
        </div>
        <div class="login-tip"></div>
        <div class="login-tr">
            <input class="inp inp-tel" placeholder="请输入账户名称" required>
        </div>
        <div class="login-tr">
            <input class="inp inp-code" placeholder="请输入密码" required>
        </div>
        <button class="login-btn" >立即登录</button>
    </div>
</div>
<script>
    // 用户登录
    $(".login-btn").click(function(){
        var name= $(".inp-tel").val();
        var pwd= $(".inp-code").val();
        console.log(name,pwd)
        $.ajax({
            type: "POST",
            dataType: "json",
            url:'/manage/login/login',
            data:{name:name,pwd:pwd},
            success: function (message){
                if(message.code== 1){
                    window.location.href='/manage/index/index';
                }else{
                    $(".login-tip").text(message.message);
                }
            }
        });
    });
</script>
<style>
    /*登录 start*/
    .login-warp{
        position: fixed;
        top: 0px;
        right: 0px;
        bottom: 0px;
        left: 0px;
        min-width: 1200px;
        margin: auto;
        background:#fff url("/Extend/images/login-bg.png") no-repeat center center;
        background-size:cover;
    }
    .login-inner{
        position: absolute;
        top: 0px;
        bottom: 0px;
        left: 350px;
        right: -350px;
        width: 325px;
        height: 385px;
        padding: 53px 44px;
        box-sizing: border-box;
        background: #fff;
        box-shadow: 0px 0px 10px rgba(0,0,45,0.2);
        border-radius: 6px;
        margin: auto;
        overflow: hidden;
    }
    .login-logo{
        width: 132px;
        height: 64px;
        margin: 0 auto;
    }
    .login-logo>img{
        width:100%;
        height:100%;
    }
    .login-tip{
        height: 20px;
        line-height: 20px;
        text-align: center;
        font-size: 12px;
        color: red;
        margin-top: 15px;
    }
    .login-tr{
        width: 100%;
        height: 30px;
        display: flex;
        flex-direction: row;
        border-bottom: 1px solid #ccc;
        padding-left: 10px;
        box-sizing: border-box;
        margin-top: 20px;
    }
    .inp{
        width: 140px;
        height: 30px;
        line-height: 30px;
        font-size: 14px;
        color: #666;
        border: none;
        background: transparent;
    }
    .login-btn{
        width:100%;
        height: 30px;
        text-align: center;
        line-height: 30px;
        border-radius: 4px;
        background: #cf1f57;
        color: #fff;
        font-size: 14px;
        letter-spacing: 2px;
        cursor: pointer;
        margin-top: 45px;
    }
    .notAllowed{
        cursor:not-allowed;
    }
    /*登录 end*/
</style>
